package com.jk.mapper;

import com.jk.model.*;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;
import java.util.List;

@Mapper
public interface WJSMapper {
    Integer findUserGe(HashMap<String, Object> params);

    List<UserBean> findUserList(HashMap<String, Object> params);

    @Insert("insert into t_user(userAccount,userPassword,userRole) values(#{userAccount},#{userPassword},3)")
    void register(UserBean userBean);

    @Select("select * from t_user where userAccount=#{userAccount}")
    UserBean queryUser(UserBean userBean);

    Integer findcount(HashMap<String, Object> params);

    List<UserBean> yimai(HashMap<String, Object> params);

    @Select("select * from t_product")
    List<ProductBean> shangpin();

    List<UserBean> daifukuan(HashMap<String, Object> params);

    List<UserBean> daifahuo(HashMap<String, Object> params);

    Integer find2(HashMap<String, Object> params);

    Integer find3(HashMap<String, Object> params);

    Integer dianpucount(HashMap<String, Object> params);

    List<UserBean> shangdian(HashMap<String, Object> params);

    @Select("select * from t_user_tree where pid = #{value}")
    List<MaiTree> findChildren(Integer id);

    Integer geshu(HashMap<String, Object> params);

    List<UserBean> findgeren(HashMap<String, Object> params);

    Integer dizigeshu(HashMap<String, Object> params);

    List<UserAcceptsite> dizi(HashMap<String, Object> params);

    @Select("update t_user set userPassword=#{password} where id=#{userId}")
    void updatePassword(@Param("password") String password,@Param("userId") Integer userId);
}
